//
//  KSCheckLogisticsHeadTableViewCell.swift
//  Supermarket
//
//  Created by Black_Crystal on 2017/9/27.
//  Copyright © 2017年 kushao. All rights reserved.
//

import UIKit

class KSCheckLogisticsHeadTableViewCell: UITableViewCell {
    
    private var headImg = UIImageView()
    private var logisticsTxtLabel = UILabel()
    private var transNumberLabel = UILabel()
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.backgroundColor = KSColor.kColorViewBackground
        
        let backView = UIView()
        backView.backgroundColor = UIColor.white
        self.contentView.addSubview(backView)
        backView.snp.makeConstraints { (make) in
            make.top.left.right.equalTo(0)
            make.bottom.equalTo(-10)
        }
        
        backView.addSubview(headImg)
        headImg.snp.makeConstraints { (make) in
            make.top.left.equalTo(10)
            make.width.height.equalTo(80)
        }
        
        let logisticsLabel = UILabel()
        logisticsLabel.text = "物流状态"
        backView.addSubview(logisticsLabel)
        logisticsLabel.snp.makeConstraints { (make) in
            make.top.equalTo(10)
            make.left.equalTo(headImg.snp.right).offset(10)
        }
        
        logisticsTxtLabel.text = "运输中"
        logisticsTxtLabel.textColor = UIColor.colorWithHexString(hex: "#006E00")
        backView.addSubview(logisticsTxtLabel)
        logisticsTxtLabel.snp.makeConstraints { (make) in
            make.centerY.equalTo(logisticsLabel)
            make.left.equalTo(logisticsLabel.snp.right).offset(5)
        }
        
        transNumberLabel.text = "运单编号：23123123321"
        backView.addSubview(transNumberLabel)
        transNumberLabel.snp.makeConstraints { (make) in
            make.top.equalTo(logisticsLabel.snp.bottom)
            make.left.equalTo(headImg.snp.right).offset(10)
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    required init(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

}
